package com.hdy.javachatroomdemo.Model;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FriendMapper {
    public List<Friend> selectAllFriend(User user);

    //查询可添加的好友
    public List<Friend> queryFriendByUserName(String friendName,String username,Integer userId);

    //保存好友请求
    public int insertFriendRequest(MessageRequest request);

    //从数据库中获取好友请求:用于判断是否已经存储
    public List<MessageResponse> queryFriendRequest(MessageRequest request);

    //从数据库中获取历史好友请求,进行处理
    public List<MessageResponse> queryFriendRequest2(Integer userId);

    //删除好友请求
    public int deleteFriendRequest(MessageRequest request);

    //添加好友
    public int addFriend(MessageRequest request);

    //查找好友关系是否存在
    public List<MessageResponse> queryFriendExists(MessageRequest request);
}
